<template>
  <el-row :gutter="20">
    <el-col :span="8">
      <el-input
        placeholder="请输入内容"
        v-model="queryInfo.query"
        clearable
        @clear="getUserList"
      >
        <el-button slot="append" icon="el-icon-search" @click="getUserList" />
      </el-input>
    </el-col>
    <el-col :span="4">
      <el-button type="primary" @click="addClick">添加用户</el-button>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: 'SearchAndAdd',
  props: {
    queryInfo: {
      type: Object,
      default() {
        return {}
      },
    },
  },
  methods: {
    getUserList() {
      this.$emit('getUserList')
    },
    addClick() {
      this.$emit('addClick')
    },
  },
}
</script>

<style lang="less" scoped>
</style>